<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class PoliceStationHasSchool extends Model
{
    use SoftDeletes;
    public $table = 'police_station_has_school';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'police_station_id',
        'school_id'
    ];

    public function school(){
        return $this->hasOne(School::class,'school_code','school_id');
    }

    public function policeStation(){
        return $this->hasOne(PoliceStation::class,'id','police_station_id');
    }
}
